package game.adm.entity;

import game.adm.dao.WithdrawDAO;
import game.adm.dao.dto.WithdrawDTO;
import game.adm.dao.factory.WithdrawFactory;
import game.adm.struts.form.WithdrawForm;

import java.util.List;

import projectx.core.base.ProjectXSystemException;
import projectx.core.base.ProjectXUserException;

public class WithdrawEntityManager {
	
	public static boolean update(String id,String orderStatus,String updateip) throws ProjectXSystemException,
			ProjectXUserException {
		WithdrawFactory factory = WithdrawFactory.getFactory();
		WithdrawDAO dao = factory.getWithdrawDAO();
		return dao.update(id, orderStatus,updateip);
	}
	
	public static WithdrawDTO getWithdrawByID(String id) throws ProjectXSystemException,
			ProjectXUserException {
		WithdrawFactory factory = WithdrawFactory.getFactory();
		WithdrawDAO dao = factory.getWithdrawDAO();
		return dao.getWithdrawByID(id);
	}
	
	public static List<WithdrawDTO> list(WithdrawForm withdrawForm) throws ProjectXSystemException,ProjectXUserException {
		WithdrawFactory factory = WithdrawFactory.getFactory();
		WithdrawDAO dao = factory.getWithdrawDAO();
		return dao.list(withdrawForm);
	}
}
